class Block < ApplicationRecord
  has_many :block_stocks
  has_many :stocks, through: :block_stocks

  scope :is_choice?, -> { where(is_choice: true) }
  def self.ransackable_attributes(auth_object = nil)
    ["cate_type", "count", "created_at", "id", "id_value", "is_choice", "name", "ts_code", "updated_at", "cycle"]
  end
end
